Optimal. Leaf size=194 \[ \frac {2 a \left (7 a^2+27 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 b \left (15 a^2+7 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a \left (7 a^2+27 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {40 a^2 b \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {4349, 3926,
4132, 3854, 3856, 2719, 4130, 2720} \begin {gather*} \frac {2 b \left (15 a^2+7 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a \left (7 a^2+27 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 a \left (7 a^2+27 b^2\right ) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{45 d}+\frac {2 b \left (15 a^2+7 b^2\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 d}+\frac {40 a^2 b \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{63 d}+\frac {2 a^2 \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x))}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3854
Rule 3856
Rule 3926
Rule 4130
Rule 4132
Rule 4349
Rubi steps
\begin {align*} \int \cos ^{\frac {9}{2}}(c+d x) (a+b \sec (c+d x))^3 \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+b \sec (c+d x))^3}{\sec ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{9} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {10 a^2 b+\frac {1}{2} a \left (7 a^2+27 b^2\right ) \sec (c+d x)+\frac {1}{2} b \left (5 a^2+9 b^2\right ) \sec ^2(c+d x)}{\sec ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{9} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {10 a^2 b+\frac {1}{2} b \left (5 a^2+9 b^2\right ) \sec ^2(c+d x)}{\sec ^{\frac {7}{2}}(c+d x)} \, dx+\frac {1}{9} \left (a \left (7 a^2+27 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a \left (7 a^2+27 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {40 a^2 b \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{7} \left (b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{15} \left (a \left (7 a^2+27 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a \left (7 a^2+27 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {40 a^2 b \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{15} \left (a \left (7 a^2+27 b^2\right )\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{21} \left (b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 a \left (7 a^2+27 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a \left (7 a^2+27 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {40 a^2 b \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{21} \left (b \left (15 a^2+7 b^2\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 a \left (7 a^2+27 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 b \left (15 a^2+7 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b \left (15 a^2+7 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a \left (7 a^2+27 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {40 a^2 b \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 a^2 \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.64, size = 137, normalized size = 0.71 \begin {gather*} \frac {84 \left (7 a^3+27 a b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+60 \left (15 a^2 b+7 b^3\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+\sqrt {\cos (c+d x)} \left (7 a \left (43 a^2+108 b^2\right ) \cos (c+d x)+5 \left (234 a^2 b+84 b^3+54 a^2 b \cos (2 (c+d x))+7 a^3 \cos (3 (c+d x))\right )\right ) \sin (c+d x)}{630 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(469\) vs.
\(2(226)=452\).
time = 0.20, size = 470, normalized size = 2.42
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-1120 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+\left (2240 a^{3}+2160 b \,a^{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-2072 a^{3}-3240 b \,a^{2}-1512 b^{2} a \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (952 a^{3}+2520 b \,a^{2}+1512 b^{2} a +420 b^{3}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-168 a^{3}-720 b \,a^{2}-378 b^{2} a -210 b^{3}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+225 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, a^{2} b +105 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, b^{3}-147 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, a^{3}-567 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, a \,b^{2}\right )}{315 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(470\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.25, size = 227, normalized size = 1.17 \begin {gather*} \frac {2 \, {\left (35 \, a^{3} \cos \left (d x + c\right )^{3} + 135 \, a^{2} b \cos \left (d x + c\right )^{2} + 225 \, a^{2} b + 105 \, b^{3} + 7 \, {\left (7 \, a^{3} + 27 \, a b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 15 \, \sqrt {2} {\left (15 i \, a^{2} b + 7 i \, b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 \, \sqrt {2} {\left (-15 i \, a^{2} b - 7 i \, b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 \, \sqrt {2} {\left (-7 i \, a^{3} - 27 i \, a b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 21 \, \sqrt {2} {\left (7 i \, a^{3} + 27 i \, a b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 178, normalized size = 0.92 \begin {gather*} \frac {2\,b^3\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3\,d}+\frac {2\,b^3\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3\,d}-\frac {2\,a^3\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,a\,b^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,a^2\,b\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________